﻿using System.Threading.Tasks;
using System.IO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace Elderos.Highlight.Search
{
    [DataContract]
    public struct FactorValue
    {
        public FactorValue(string ruleName, double weight)
            : this()
        {
            Weight = weight;
            FactorName = ruleName;
        }

        [DataMember(EmitDefaultValue = false, Name = "W")]
        public double Weight { get; private set; }
        [DataMember(Name = "N")]
        public string FactorName { get; private set; }

        public override string ToString()
        {
            return FactorName + ": " + Weight;
        }
    }
}
